//
//  NSDate+SLSDK.m
//  SLSDK
//
//  Created by SongLian on 16/8/7.
//  Copyright © 2016年 SongLian. All rights reserved.
//

#import "NSDate+SLSDK.h"

@implementation NSDate (SLSDK)

- (NSString *)sl_stringSince1970 {
    return @(@(self.timeIntervalSince1970).integerValue).stringValue;
}

//  @"yyyy-MM-dd HH:mm"
- (NSString *)sl_stringWithDateFormat:(NSString *)dateFormat {
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:dateFormat];
    NSString *dateString = [dateFormatter stringFromDate:self];
    return dateString;
}

@end
